From 2e2807f1af972aa190ec6415bec53112cd0aeaae Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 11 Oct 2002 15:48:23 +0000 Subject: [PATCH] Add waypt_del(). --- gpsbabel/defs.h | 1 + gpsbabel/waypt.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index 52f39cb94..c3870be73 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -89,6 +89,7 @@ typedef void (*ff_write) (void); typedef void (*waypt_cb) (const waypoint *); void waypt_add (waypoint *); +void waypt_del (waypoint *); void route_add (waypoint *); void waypt_disp_all(waypt_cb); unsigned int waypt_count(void); diff --git a/gpsbabel/waypt.c b/gpsbabel/waypt.c index 5a04006f5..ea477ab53 100644 --- a/gpsbabel/waypt.c +++ b/gpsbabel/waypt.c @@ -38,6 +38,13 @@ waypt_add(waypoint *wpt) waypt_ct++; } +void +waypt_del(waypoint *wpt) +{ + dequeue(&wpt->Q); + waypt_ct--; +} + unsigned int waypt_count(void) { -- 2.30.2